home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58a.iso / extras / quake 3 source / Q3A_ToolSource.exe / Main / Winding.h < prev    next >
Encoding:
Text File  |  2001-01-02  |  2.2 KB  |  50 lines

  1.  
  2.  
  3.  
  4. //returns true if the planes are equal
  5. int            Plane_Equal(plane_t *a, plane_t *b, int flip);
  6. //returns false if the points are colinear
  7. int            Plane_FromPoints(vec3_t p1, vec3_t p2, vec3_t p3, plane_t *plane);
  8. //returns true if the points are equal
  9. int            Point_Equal(vec3_t p1, vec3_t p2, float epsilon);
  10.  
  11. //allocate a winding
  12. winding_t*    Winding_Alloc(int points);
  13. //free the winding
  14. void        Winding_Free(winding_t *w);
  15. //create a base winding for the plane
  16. winding_t*    Winding_BaseForPlane (plane_t *p);
  17. //make a winding clone
  18. winding_t*    Winding_Clone(winding_t *w );
  19. //creates the reversed winding
  20. winding_t*    Winding_Reverse(winding_t *w);
  21. //remove a point from the winding
  22. void        Winding_RemovePoint(winding_t *w, int point);
  23. //inserts a point to a winding, creating a new winding
  24. winding_t*    Winding_InsertPoint(winding_t *w, vec3_t point, int spot);
  25. //returns true if the planes are concave
  26. int            Winding_PlanesConcave(winding_t *w1, winding_t *w2,
  27.                                      vec3_t normal1, vec3_t normal2,
  28.                                      float dist1, float dist2);
  29. //returns true if the winding is tiny
  30. int            Winding_IsTiny(winding_t *w);
  31. //returns true if the winding is huge
  32. int            Winding_IsHuge(winding_t *w);
  33. //clip the winding with the plane
  34. winding_t*    Winding_Clip(winding_t *in, plane_t *split, qboolean keepon);
  35. //split the winding with the plane
  36. void        Winding_SplitEpsilon(winding_t *in, vec3_t normal, double dist, 
  37.                                 vec_t epsilon, winding_t **front, winding_t **back);
  38. //try to merge the windings, returns the new merged winding or NULL
  39. winding_t *Winding_TryMerge(winding_t *f1, winding_t *f2, vec3_t planenormal, int keep);
  40. //create a plane for the winding
  41. void        Winding_Plane(winding_t *w, vec3_t normal, double *dist);
  42. //returns the winding area
  43. float        Winding_Area(winding_t *w);
  44. //returns the bounds of the winding
  45. void        Winding_Bounds(winding_t *w, vec3_t mins, vec3_t maxs);
  46. //returns true if the point is inside the winding
  47. int            Winding_PointInside(winding_t *w, plane_t *plane, vec3_t point, float epsilon);
  48. //returns true if the vector intersects with the winding
  49. int            Winding_VectorIntersect(winding_t *w, plane_t *plane, vec3_t p1, vec3_t p2, float epsilon);
  50.